package SFT;

/** This is a representation and implementation of a pair ( , ) 
 * This type is used in the SFT algorithm in order to represent a segment [a,b] where a<=b
 * and a,b are in Zn
 * 
 * */

public class Pair {

	private int i;
	private int j;

	public Pair(int i, int j) {
		this.i=i;
		this.j=j;
	}

	public int car() {
		return i;
	}

	public int cdr() {
		return j;
	}

	public int length() {
		return this.j-this.i+1;
	}


}
